package com.zhentao.model.user.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 *
 * @TableName ap_user
 */
@TableName(value ="ap_user")
@Data
public class ApUser implements Serializable {
    /**
     * 用户ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户昵称
     */
    @TableField(value = "nick_name")
    private String nickName;

    /**
     * 头像地址
     */
    @TableField(value = "avatar_url")
    private String avatarUrl;

    /**
     * 用户手机号
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 用户身份(1普通/2VIP/3预备红娘/4红娘)
     */
    @TableField(value = "identity")
    private Integer identity;

    /**
     * 推荐人ID（0绑定公司）
     */
    @TableField(value = "referrer_id")
    private Integer referrerId;
    /**
     * 推荐人姓名
     */
    @TableField(exist = false)
    private String referrerName;

    /**
     * 红娘ID
     */
    @TableField(value = "matchmaker_id")
    private Integer matchmakerId;

    /**
     * 是否实名（0未实名/1已实名）
     */
    @TableField(value = "is_real")
    private Integer isReal;

    /**
     * 用户余额
     */
    @TableField(value = "balance")
    private double balance;

    /**
     * 状态（0可用/1不可用）
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 微信ID
     */
    @TableField(value = "openid")
    private String openid;

    /**
     * 创建时间
     */
    @TableField(value = "created_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    private Date createdTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    @TableField(exist = false)
    private Date pastTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
